<?php
class Pageley_Query_Direction {
    public static $ASCENDING;
    public static $DESCENDING;
    
    private $description;
    private $ascending;
    
    public function __construct($description, $ascending) {
        $this->description = $description;
        $this->ascending = $ascending;
    }
    
    public function getDescription() {
        return $this->description;
    }
    
    public function isAscending() {
        return $this->ascending;
    }
    
    public function __toString() {
        return $this->description;
    }
}

Pageley_Query_Direction::$ASCENDING = new Pageley_Query_Direction("ascending", true);
Pageley_Query_Direction::$DESCENDING = new Pageley_Query_Direction("descending", false);